<template>
	<view class="flex align-center justify-between mx-3 my-4">
		<block v-for="(item, index) in functionSortArr" :key="index">
			<view class="flex flex-column align-center" @tap="switchToPage(index)">
				<iconfont :iconId="item.iconId" :iconColor="item.iconColor" iconSize="65"></iconfont>
				<text class="mt-1 font text-light-black">{{item.name}}</text>
			</view>
		</block>
	</view>
</template>

<script>
	let pageList = [
		"/pages/readList/readList",
		"/pages/listenNoval/listenNoval",
		"/pages/listenMusic/listenMusic",
		"/pages/listenKnowledge/listenKnowledge",
	]

	export default {
		name: "functionsort",
		props: {
			functionSortArr: {
				type: Array,
				default: () => []
			}
		},
		data() {
			return {

			};
		},
		methods: {
			switchToPage(pageIndex) {
				uni.navigateTo({
					url: pageList[pageIndex]
				})
			}
		}
	}
</script>

<style>

</style>
